<template>  
    <div class="category-detail">  
      <h2>分类详情 - {{ categoryName }}</h2>  
      <!-- 这里可以添加更多详情内容 -->  
    </div>  
  </template>  
    
  <script>  
  export default {  
    props: ['categoryId'],  
    data() {  
      return {  
        categories: [  
          { id: 1, name: '电子产品', description: '各种电子设备，如手机、电脑等' },  
          { id: 2, name: '家具家电', description: '各种家具和家用电器' },  
          { id: 3, name: '书籍资料', description: '各类书籍和学习资料' },  
          { id: 4, name: '交通工具', description: '汽车、摩托车等交通工具' },  
          // 添加更多分类和描述  
        ],  
      };  
    },  
    computed: {  
      categoryName() {  
        const category = this.categories.find(c => c.id === parseInt(this.$route.params.id, 10));  
        return category ? category.name : '未知分类';  
      },  
      categoryDescription() {  
        const category = this.categories.find(c => c.id === parseInt(this.$route.params.id, 10));  
        return category ? category.description : '无描述';  
      },  
    },  
  };  
  </script>  
    
  <style scoped>  
  .category-detail {  
    padding: 20px;  
  }  
  </style>